home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (C) 1994, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
- /*----------------------------------------------------------------------------
- *
- * file : globals_vol.h
- *
- * Author : Yusuf Attarwala
- * Date : Sep 93
- *
- *---------------------------------------------------------------------------*/
- #include <stdio.h>
- #include <X11/Intrinsic.h>
- #include <Xm/Xm.h>
- #include <gl.h>
-
- #ifdef DEFINE_VOL_GLOBALS
- #define VOL_GLOBAL
- #define VOL_INIT(x) = x
- #else
- #define VOL_GLOBAL extern
- #define VOL_INIT(x)
- #endif
-
- #include "defines_vol.h"
-
- VOL_GLOBAL Display *display;
- VOL_GLOBAL long screen;
- VOL_GLOBAL XtAppContext appContext;
- VOL_GLOBAL XtTranslations transTable;
- VOL_GLOBAL Widget toplevel,
- glw;
- VOL_GLOBAL Widget messageDialog,
- questionDialog,
- fileSelectionBox;
- VOL_GLOBAL Dimension window_height,
- window_width;
-
- VOL_GLOBAL int width,height,depth; /* size of volume */
-
- VOL_GLOBAL float bminx,bmaxx, /* bounding box in world coords */
- bminy,bmaxy,
- bminz,bmaxz,
- bdiag;
-
- VOL_GLOBAL long wminx,wmaxx, /* window size */
- wminy,wmaxy;
-
- VOL_GLOBAL float xy_v0[3],
- xy_v1[3],
- xy_v2[3],
- xy_v3[3];
- VOL_GLOBAL float yz_v0[3],
- yz_v1[3],
- yz_v2[3],
- yz_v3[3];
- VOL_GLOBAL float zx_v0[3],
- zx_v1[3],
- zx_v2[3],
- zx_v3[3];
-
- VOL_GLOBAL float left,right, /* projection parameters */
- bottom,top,
- near,far,
- reset_left,
- reset_right,
- reset_bottom,
- reset_top,
- reset_near,
- reset_far;
-
- VOL_GLOBAL float x_world_per_pixel,
- y_world_per_pixel,
- world_aspect,
- rotn_sens;
-
- VOL_GLOBAL float azimuth, /* viewing parameters */
- incidence,
- twist,
- distance,
- reset_azimuth,
- reset_incidence,
- reset_twist,
- reset_distance;
-
- VOL_GLOBAL Angle anglex,
- angley,
- anglez,
- reset_anglex,
- reset_angley,
- reset_anglez;
-
- VOL_GLOBAL Matrix vmat,
- mmat,
- reset_vmat,
- reset_mmat;
-
- static Matrix identity = {1.0,0.0,0.0,0.0,
- 0.0,1.0,0.0,0.0,
- 0.0,0.0,1.0,0.0,
- 0.0,0.0,0.0,1.0};
-
- VOL_GLOBAL unsigned long cpackValue;
- VOL_GLOBAL unsigned char cpackAlpha,
- cpackRed,cpackBlue,cpackGreen;
-
- typedef struct {
- int onOff;
- float coeff[4];
- float xyz[3];
- float min,max;
- }Clip;
-
- VOL_GLOBAL Clip clip[6];
- VOL_GLOBAL int activeClipPlane;
-
- VOL_GLOBAL float fogParams[5];
- VOL_GLOBAL float fogRGB[3];
- VOL_GLOBAL float fogDensity,startFog,endFog;
- VOL_GLOBAL int lightWeightCount;
-
- VOL_GLOBAL int degenMode, /* bunch of state flags */
- drawAxis,
- doClipping,
- displayClipPlanes,
- drawBoundingBox,
- doLighting,
- screenAxes,
- refresh,
- trackBall,
- doubleBuffer,
- lightWeight,
- drawMode,
- dontBlend,
- lockAView,
- moveSlice,
- obliquePlane,
- fog,
- fogMode,
- textureMode;
-
- /* these should be on the last lines */
- #undef VOL_INIT
- #undef VOL_GLOBAL
-